#!/bin/bash
#filename:statistical_file.sh

echo -n -e "\t\e[1;43;35mplease input you need statistical file path (An absolute path):\e[0m";read u_path
echo
path_num=`ls -l -R -A ${u_path} |egrep "^d" |wc -l`
echo -e "\t\e[34mThe number of directory:\e[32m${path_num}\e[0m"

path_file=`ls -l -R -A ${u_path} |egrep "^-" |wc -l`
echo -e "\t\e[35mThe number of file:\e[33m${path_file}\e[0m"

